package instantHelper.Raceway;

import it.sauronsoftware.ftp4j.FTPClient;
import java.io.*;
import android.app.Activity;
import android.os.Bundle;

public class FTPHelper {
	public static boolean sendToServer(String FilePath, String fileTypePath) {
		FTPClient ftpClient = new FTPClient();
		try {
			ftpClient.setAutoNoopTimeout(15000);
			ftpClient.connect(InstantHelperConstant.FTPAddress);
			ftpClient.login(InstantHelperConstant.FTPUserName,
					InstantHelperConstant.FTPUserPassword);
			ftpClient.changeDirectory(fileTypePath);
			File sFile = new File(FilePath);
			ftpClient.upload(sFile);
			ftpClient.disconnect(true);
			return true;

		} catch (Exception e) {
			e.printStackTrace();
			return false;
		}
	}
}